import type { TLoginReq, TFriendsListReq } from "@/stores/typings/chat";
import { alovaInstance } from "@/utils/request";

export const login = (loginReq: TLoginReq) => alovaInstance.Post('/api/auth/login', loginReq)
export const register = (registerReq: TLoginReq) => alovaInstance.Post('/api/auth/register', registerReq)

export const queryNotFriendsList = (friendsListReq: TFriendsListReq) => alovaInstance.Get('/api/friend/friendList', { params: friendsListReq })
export const queryUserListByGroupId = (groupId: string) => alovaInstance.Get('/api/group/groupUser', { params: { groupId } })

export const queryUserListByUserId = (userId: string) => alovaInstance.Get('/api/friend/friendListByUserId', { params: { userId } })
